package com.cango.qutz.web.auth.position.dao.impl;

import com.cango.qutz.web.auth.position.dao.IPositionDao;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.cango.qutz.web.auth.position.dao.IPositionDao;
import com.cango.framework.base.dao.BaseDaoImpl;

/**
 * <p>
 * ClassName: PositionDaoImpl
 * </p>
 * <p>
 * Description: 岗位dao实现类
 * </p>
 * <p>
 * Author: weih
 * </p>
 * <p>
 * Date: 2015-04-01
 * </p>
 */
@Repository("positionDao")
public class PositionDaoImpl extends BaseDaoImpl implements IPositionDao {

    /**
     * <p>
     * Field sqlSession: 注入sqlSession
     * </p>
     */
    @Autowired
    private SqlSessionTemplate sqlSession;

    @Override
    public int queryCountByCode(String sqlId, String positionCode) {
        return this.sqlSession.selectOne(sqlId, positionCode);
    }

    @Override
    public int queryUserCountByPos(String sqlId, Integer positionId) {
        return this.sqlSession.selectOne(sqlId, positionId);
    }

}
